package com.cskaoyan.weixin.controller;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.Region;
import com.cskaoyan.weixin.service.WxRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/wx/region")
public class WxRegionController {

    @Autowired
    WxRegionService wxRegionService;

    @RequestMapping("/list")
    public BaseRespVo list(Integer pid) {
        List<Region> regionList =  wxRegionService.list(pid);
        return BaseRespVo.ok(regionList);
    }
}
